
#include "bsp_config.h"

int fputc(int c, FILE *f)
{
    while (LPUART_HAL_FLAG_TX_EMPTY_MASK != (LPUART_HAL_FLAG_TX_EMPTY_MASK & LPUART_HAL_GetStatus(BSP_LPUART_DEBUG_PORT)))
    {}
    LPUART_HAL_SetTxData(BSP_LPUART_DEBUG_PORT, c);
    return c;
}

int fgetc(FILE *f)
{
    while (LPUART_HAL_FLAG_RX_FULL_MASK != (LPUART_HAL_FLAG_RX_FULL_MASK & LPUART_HAL_GetStatus(BSP_LPUART_DEBUG_PORT)))
    {}
    return LPUART_HAL_GetRxData(BSP_LPUART_DEBUG_PORT);
}

/* EOF. */
